package com.ztgf.commodity.models.service;

import com.baomidou.mybatisplus.service.IService;
import com.ztgf.commodity.models.bo.CommodityComboRelationSaveBO;
import com.ztgf.commodity.models.dto.CommodityComboRelationDTO;
import com.ztgf.commodity.models.vo.CommodityComboRelationVO;

/**
 * 商品套餐关系表服务
 *
 * @author chenyu.wang
 * @Date 2020-06-15 14:09:15
 */
public interface ICommodityComboRelationService extends IService<CommodityComboRelationDTO> {
    boolean add(CommodityComboRelationSaveBO saveBO);

    /**
     * description: 根据商品id和套餐表id获取商品套餐价格信息
     * param: [goodsId, comboId]
     * author: chenyu.wang
     * date: 2020-06-15
     * return: com.ztgf.commodity.models.dto.CommodityComboRelationDTO
     */
    CommodityComboRelationVO getByGoodsIdAndComboId(Long goodsId, Long comboId);

    CommodityComboRelationDTO selectByCommodityAndComIds(Long comboId, Long goodsId);

    /**
     * description: 根据商品id删除
     * param: [id]
     * author: chenyu.wang
     * date: 2020-07-16
     * return: boolean
     */
    boolean deleteByCommodityId(Long id);
}
